import request from '@/axios/axios.js'
//物料bom全量
export const BomApi = (params) => {
    return request({
        method: 'post',
        url: '/api/basedataMaterialBom/getAll',
        data: params
    })
}
//物料
export const materialAllApi = (params) => {
    return request({
        method: 'post',
        url: '/api/basedataMaterial/getAll',
        data: params
    })
}
//物料bom编辑
export const editApi = (params) => {
    return request({
        method: 'put',
        url: '/api/basedataMaterialBomDetails/update',
        data: params
    })
}
//物料bom新增
export const addApi = (params) => {
    return request({
        method: 'post',
        url: '/api/basedataMaterialBomDetails/save',
        data: params
    })
}
// 删除
export const deleteApi = (params) => {
    return request({
        method: 'delete',
        url: '/api/basedataMaterialBomDetails/delete',
        data: params
    })
}
//物料bom查询
export const productApi = (params) => {
    return request({
        method: 'post',
        url: '/api/basedataMaterialBomDetails/getPage',
        data: params
    })
}

//设备被多少个工单所用
export const queryByWorkOrder = (params) => {
    return request({
        method: 'post',
        url: '/api/basedataEquipment/queryByWorkOrder',
        data: params
    })
}
